import pygame

class Wall(pygame.sprite.Sprite):
    ''' The Wall class represents a wall that blocks the player. It's
    essentially just a colored rectangle
    '''
    def __init__(self, x, y, width, height, config):
        pygame.sprite.Sprite.__init__(self)

        # Make a wall, of the size specified in the parameters
        self.image = pygame.Surface([width, height])

        # Color the wall according to Config--normal color, unless we're in
        # Firewall Mode, then use the fire color instead
        self.image.fill(config.colors['wall_color'] \
            if not config.firewall_mode else config.colors['fire_color'])

        # Make our top-left corner the passed-in location. x and y are pixel
        # values, not grid values
        self.rect = self.image.get_rect()
        self.rect.left = x
        self.rect.top = y
